﻿@model KL.Store.Web.Models.CartCheckOutModel
@using KL.Store.Core
@{
    ViewBag.Title = "Ödeme Yap";
    Layout = "~/Views/Shared/" + Parameters.Layout + ".cshtml";
    var showMenu = false;
    var menuStyle = "";
    var contentStyle = "";
    if (showMenu)
    {
        menuStyle = "hidden-xs hidden-sm col-md-3 col-lg-2 left first last";
        contentStyle = "col-xs-12 col-sm-12 col-md-9 col-lg-10 left";
        if (Parameters.Theme == "DK" || Parameters.Theme == "EO")
        {
            menuStyle = "hidden-xs hidden-sm col-md-4 col-lg-3 left first last";
            contentStyle = "col-xs-12 col-sm-12 col-md-8 col-lg-9 left";
        }
    }
    else
    {
        menuStyle = "";
        contentStyle = "col-xs-12 col-sm-12 col-md-12 col-lg-12 first last";
    }
}
<div class="breadcrumb col-xs-12 col-sm-12 col-md-12 col-lg-12">
    <div class="bcBorder"></div>
    <div class="bcLinks">
        <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
            <a href="/" itemprop="url">
                <span itemprop="title">Anasayfa</span>
            </a>›
        </div>
        <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
            <a href="/Cart/CheckoutCustom" itemprop="url">
                <span itemprop="title">Ödeme Yap</span>
            </a>
        </div>
    </div>
    <div class="bcBorder"></div>
</div>
<div class="clearfix"></div>
@if (showMenu)
{
    <div class="@menuStyle">
        @{Html.RenderAction("Categories", "Partials");}
        @{Html.RenderAction("Information", "Partials"); }
        @{Html.RenderAction("Account", "Partials"); }
    </div>
}
<div class="@contentStyle">
    <div class="content">
        <h1>Ödeme</h1>
        <div id="checkoutForm">
            @{
                Html.RenderAction("GetCheckOutCustom", "Cart");
            }
        </div>
        <div id="dialog-form" title="Adres">
        </div>
        <div id="dialog-contract" title="Sözleşme">
        </div>
    </div>
</div>
<script type="text/javascript">
    function toplamClick(i)
    {
        if (i == 1)
        {
            $('#PartialPayment').css("visibility", "hidden");
        }
        else
        {
            $('#PartialPayment').css("visibility", "visible");
            $('#PartialPayment').focus();
        }
    }

    var lastKey = 0;

    function KeyUp(This)
    {
        var chars = $(This).val().length;
        var max = $(This).attr("maxlength");
        if (chars == 0 && lastKey == 8)
        {
            $(This).prev().prev('input.number').focus();
        }
        if (chars == max)
        {
            $(This).next().next('input.number').focus();
        }
    }

    function KeyDown(e)
    {
        lastKey = e.keyCode;
        if (!(e.keyCode >= 48 && e.keyCode <= 57) && !(e.keyCode >= 96 && e.keyCode <= 105) && (e.keyCode != 9 && e.keyCode != 8 && e.keyCode != 46))
        {
            return false;
        }
    }
</script>
